Use nullptr instead of comparing to 0
authorCMCOliver <oheesakkers@conclusion.nl>
Tue, 24 Jan 2017 15:27:18 +0000 (16:27 +0100)
committerCMCOliver <oheesakkers@conclusion.nl>
Tue, 24 Jan 2017 15:27:18 +0000 (16:27 +0100)
bushnell.cc

index f4cad0b268973fc7f57b18bb3bb18e9b772a4434..f44b7fde7279fb46e6b58e605851863c8084a63f 100644 (file)
@@ -136,7 +136,7 @@ bushnell_get_icon_from_name(QString name)
     name = "Waypoint";
   }
 
-  for (t = bushnell_icons; t->icon > 0; t++) {
+  for (t = bushnell_icons; t->icon != nullptr; t++) {
     if (0 == name.compare(t->icon, Qt::CaseInsensitive)) {
       return t->symbol;
     }
@@ -148,7 +148,7 @@ static const char*
 bushnell_get_name_from_symbol(signed int s)
 {
   icon_mapping_t* t;
-  for (t = bushnell_icons; t->icon > 0; t++) {
+  for (t = bushnell_icons; t->icon != nullptr; t++) {
     if (s == t->symbol) {
       return t->icon;
     }